#ifndef Testing_h
#define Testing_h
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "Commands.h"
#include "MemoryManager.h"
#include "LRU.h"



/* Testing Options */
extern int testMode;       /* The test mode (0 = dynamic, 1 = static, 2 = redirection) */

void print_useTable();



/**
 * Gets a command from the user and parses it into it's various components.
 * @author Daniel Fairweather
 * @returns 1 if its a command, 0 if its a comment, but it does set the global variables 'command', 'args', and 'argc'.
 */
int getCommand();



/**
 * Sets the result of the running command. (Sets command if testMode is static or redirection)
 * @author Daniel Fairweather
 * @returns nothing, but it does set the global variables 'result'.
 */
void setResult(char* string);



/**
 * Clears the console screen.
 * @author Daniel Fairweather
 */
void clearScreen();



/**
 * Prints any necessary OS information.
 * @author Daniel Fairweather
 */
void printSystemModule();



/**
 * Prints the previous command and it's result.
 * @author Daniel Fairweather
 */
void printResultModule();



/**
 * Prints a divider to the console.
 * @author Daniel Fairweather
 */
void printdiv();

void printLRUModule();



/**
 * Prints user data structures
 * @author Ying Wang
 */
void printUserDataStructureModule();



/**
 * Prints all defined page tables
 * @author Ying Wang
 */
void printPageTablesModule();



/**
 * Prints system data structures
 * @author Ying Wang
 */
void printSystemDataStructureModule();



/**
 * Prints the binary representation of a short unsigned int
 * @author Jan Durakiewicz
 * @param n the short uint to print
 */
void print_binary(short unsigned int n);



/**
 * Print the contents of the use table, useful if size is reduced
 * @author Jan Durakiewicz
 */
void print_useTable();



/**
 * Lists all allocated user tables
 * @author Jan Durakiewicz
 */
void list_all_pagetables();



/**
 * Lists the pagetable with specified ID
 * @author Jan Durakiewicz
 * @param the ID of the table to print
 */
void list_pagetable(int tableID);



/**
 * Lists system structure
 * @author Ying Wang
 */ 
void list_system();



/**
 * Lists user structure
 * @author Ying Wang
 */ 
void list_user();



#endif